3D Coding TAT - Patchwork Landscapes

TAD

This is a way to describe a 3d landscape (hills and valleys) using a 2d array to define the height at regular intervals. When most people think about patchwork landscapes they often think of games like Virus or (one of my favourites) Hunter. But I think other games used similar methods a few years before Virus. I think the old Spectrum game "Combat Linx" used a filled 3d landscape and no doubt other games before that did aswell.

It is possibly the most simple landscape to create, just take a 2d array of numbers to represent the height of each corner point and draw them at equal intervals on the screen. A lot of games use 2 of these arrays, one for height and one for color. This doubles the amount of storage needed but allows for a landscape to be shaded and designed far more than a simple use-the-height- as-color approach using 1 array.

The great advantage of this form of modelling is that a small number of points can represent a vast landscape area just by making the spacing between each corner reasonably large in size. But the bigger the spacing the rougher the landscape will look.

One disadvantage is that hills and valleys tend to look very sharp and angular because straight lines are drawn between two corners and filled with color (or a texture). This might look okay for nearly flat landscapes or for sharp mountain peaks, but it looks lousy for hills. As flat polygons are mostly used to draw each map cell this means lighting is usually very flat too (only using a single color for the entire polygon.

Each map polygon doesn't have to be filled in this "Flat-Shading" way, other techniques such as Gouraud or Phong shading can be use to simulate the shading differences between pixels in the same polygon. You could sub-divide each polygon when you come to render it and draw 4 polygons instead of just 1, this would help create more visible detail without the need to store extra vertices for the mid points. This can lead onto fractal like techniques where the small detail in the landscapes are created in REAL-TIME rather than being stored like the corner vertices. The distance to the polygon can be used to control the amount of sub-division and fractal generation it uses. Closer (large) polygons can be sub-divided more to give much more detail whereas further (small) polygons might only have a single sub-division or none at all.

Another way to make landscapes and terrains look much more realistic is to draw curves between two map corner points instead of straight lines. This can cause problems with clipping, hidden surface removal (not to mention the maths involved to calculate the curve!).

TAD #:o)